package com.wf.smartcomm.server.bean;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import com.google.gson.annotations.Expose;

/** 
 * @author 38884306@qq.com  
 * @version ����ʱ�䣺2015-5-18 ����11:11:32 
 * 
 */
@Entity
@Table(name = "t_repair")
public class Repair {
	@Expose
	@Id
	@Column(length = 32)
	private String objectId;

	@Expose
	@ManyToOne(fetch=FetchType.EAGER)
	@JoinColumn(name = "uid")
	private User user;
	
	@Expose
	@ManyToOne(fetch=FetchType.EAGER)
	@JoinColumn(name = "hid")
	private House house;
	
	@Expose
	@Column(length=4000)
	private String description;
	
	@Expose
	@Column(length=4000)
	private String content;

	@Expose
	@Column
	private Integer type;
	
	@Expose
	@Column(length = 20)
	private String startAt;
	
	@Expose
	@Column(length = 20)
	private String endAt;
	
	@Expose
	@Column(length = 1)
	private String status;
	
	@Expose
	@OneToMany(mappedBy = "repair",fetch = FetchType.EAGER)
	private Set<ThumbImage> thumbImages;
	
	@Expose
	@Column(length = 20)
	private String createdAt;
	
	@Column(length = 20)
	private String updateAt;
	
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public House getHouse() {
		return house;
	}

	public void setHouse(House house) {
		this.house = house;
	}

	public String getObjectId() {
		return objectId;
	}

	public void setObjectId(String objectId) {
		this.objectId = objectId;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getStartAt() {
		return startAt;
	}

	public void setStartAt(String startAt) {
		this.startAt = startAt;
	}

	public String getEndAt() {
		return endAt;
	}

	public void setEndAt(String endAt) {
		this.endAt = endAt;
	}

	public Set<ThumbImage> getThumbImages() {
		return thumbImages;
	}

	public void setThumbImages(Set<ThumbImage> thumbImages) {
		this.thumbImages = thumbImages;
	}

	public String getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt(String createdAt) {
		this.createdAt = createdAt;
	}

	public String getUpdateAt() {
		return updateAt;
	}

	public void setUpdateAt(String updateAt) {
		this.updateAt = updateAt;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
}
